.class public Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/util/OrmmaUtils;
.super Ljava/lang/Object;
.source "OrmmaUtils.java"


# static fields
.field private static final CHAR_SET:Ljava/lang/String; = "ISO-8859-1"

.field private static final LOG:Lcom/burstly/lib/util/LoggerExt; = null

.field private static final TAG:Ljava/lang/String; = "OrmmaUtils"


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 23
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/util/OrmmaUtils;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-void
.end method

.method private constructor <init>()V
    .locals 0

    .prologue
    .line 38
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 39
    return-void
.end method

.method public static byteToHex(B)Ljava/lang/String;
    .locals 4
    .parameter "b"

    .prologue
    .line 48
    const/16 v2, 0x10

    new-array v1, v2, [C

    fill-array-data v1, :array_0

    .line 51
    .local v1, hexDigit:[C
    const/4 v2, 0x2

    new-array v0, v2, [C

    const/4 v2, 0x0

    shr-int/lit8 v3, p0, 0x4

    and-int/lit8 v3, v3, 0xf

    aget-char v3, v1, v3

    aput-char v3, v0, v2

    const/4 v2, 0x1

    and-int/lit8 v3, p0, 0xf

    aget-char v3, v1, v3

    aput-char v3, v0, v2

    .line 54
    .local v0, array:[C
    new-instance v2, Ljava/lang/String;

    invoke-direct {v2, v0}, Ljava/lang/String;-><init>([C)V

    return-object v2

    .line 48
    :array_0
    .array-data 0x2
        0x30t 0x0t
        0x31t 0x0t
        0x32t 0x0t
        0x33t 0x0t
        0x34t 0x0t
        0x35t 0x0t
        0x36t 0x0t
        0x37t 0x0t
        0x38t 0x0t
        0x39t 0x0t
        0x61t 0x0t
        0x62t 0x0t
        0x63t 0x0t
        0x64t 0x0t
        0x65t 0x0t
        0x66t 0x0t
    .end array-data
.end method

.method public static convert(Ljava/lang/String;)Ljava/lang/String;
    .locals 7
    .parameter "str"

    .prologue
    .line 65
    :try_start_0
    invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B

    move-result-object v0

    .line 66
    .local v0, array:[B
    new-instance v1, Ljava/lang/StringBuffer;

    invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V

    .line 67
    .local v1, buffer:Ljava/lang/StringBuffer;
    const/4 v3, 0x0

    .local v3, k:I
    :goto_0
    array-length v4, v0

    if-ge v3, v4, :cond_1

    .line 68
    aget-byte v4, v0, v3

    and-int/lit16 v4, v4, 0x80

    if-lez v4, :cond_0

    .line 69
    const/16 v4, 0x25

    invoke-virtual {v1, v4}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    move-result-object v4

    aget-byte v5, v0, v3

    invoke-static {v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/util/OrmmaUtils;->byteToHex(B)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 67
    :goto_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 71
    :cond_0
    aget-byte v4, v0, v3

    int-to-char v4, v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    .line 76
    .end local v0           #array:[B
    .end local v1           #buffer:Ljava/lang/StringBuffer;
    .end local v3           #k:I
    :catch_0
    move-exception v2

    .line 77
    .local v2, e:Ljava/lang/Exception;
    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/util/OrmmaUtils;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v5, "OrmmaUtils"

    invoke-virtual {v4, v5, v2}, Lcom/burstly/lib/util/LoggerExt;->logThrowable(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 79
    const/4 v4, 0x0

    .end local v2           #e:Ljava/lang/Exception;
    :goto_2
    return-object v4

    .line 74
    .restart local v0       #array:[B
    .restart local v1       #buffer:Ljava/lang/StringBuffer;
    .restart local v3       #k:I
    :cond_1
    :try_start_1
    new-instance v4, Ljava/lang/String;

    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->getBytes()[B

    move-result-object v5

    const-string v6, "ISO-8859-1"

    invoke-direct {v4, v5, v6}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2
.end method

.method public static getData(Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/String;
    .locals 1
    .parameter "key"
    .parameter "data"

    .prologue
    .line 90
    invoke-virtual {p1, p0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
